home *** CD-ROM | disk | FTP | other *** search
- Path: airdmhor.gen.nz!not-for-mail
- From: gumboot@airdmhor.gen.nz (Simon Hosie)
- Newsgroups: comp.lang.c
- Subject: Re: Easiest way to center a string?
- Date: 20 Feb 1996 18:37:28 +1300
- Organization: Airdmhor : a couple of BBS's, a bunch of people, and a cat.
- Message-ID: <4gbmmo$m5v@airdmhor.gen.nz>
- References: <4fobka$1st@parlor.hiwaay.net> <DMqEG5.8z4@eskimo.com> <4frif5$e6p@fohnix.metronet.com> <DMuuzG.1yK@eskimo.com>
- NNTP-Posting-Host: airdmhor.gen.nz
- X-Newsreader: TIN [version 1.2 PL2]
-
- Whoever:
- > <whatever>
-
- mAg:
- > Have you found a better way using the man page on printf(). I would appreciate if you could
- > share it with the rest of the newsgroup.
-
- Is this portable (I don't have my man pages available, I broke them)..
-
- #define LineLen 80
- char *String = "I am a fish";
-
- printf("%*s\n", (strlen(String - LineLen) / 2, String);
-